* Multiproduct Firms, Horizontal Mergers, and International Trade
* Jackie M.L. Chan, Michael Irlacher, and Michael Koch

* This do file runs additional regressions for domestic market outcomes.

* Main data
use "D:\Data\Workdata\703989\FJSJ3989\CIK\replication_restat\data\regression_data_domestic_figureA12ab.dta", clear

* Figure A.12(a) and (b)
foreach x in lnnprod {
did_imputation `x' group_cvrnr aarA aar3 if minemployee_cvrnr>=10, fe(group_cvrnr aarA) hor(0/2) pretrend(4) tol(0.0001) maxit(250) autosample cluster(ind)
outreg2 using "D:\Data\Workdata\703989\FJSJ3989\CIK\replication_restat\output\table_figureA12.txt", bdec(4) sdec(4) nocons nonotes 
}

foreach x in lnnprodAT_nodup {	
did_imputation `x' group_cvrnr aarA aar3 if minemployee_cvrnr>=10 & ((acquirer==1 & ((nprodT>0 & d_yr<=0) | d_yr>0)) | acquirer==0), fe(group_cvrnr aarA) hor(0/2) pretrend(4) tol(0.0001) maxit(500) autosample cluster(ind)
outreg2 using "D:\Data\Workdata\703989\FJSJ3989\CIK\replication_restat\output\table_figureA12.txt", bdec(4) sdec(4) nocons nonotes 
}

foreach x in theil_fy lnrev_max lnrev_med lnrev_min {
did_imputation `x' group_cvrnr aarA aar3 if minemployee_cvrnr>=10, fe(group_cvrnr aarA) hor(0/2) pretrend(4) tol(0.0001) maxit(250) autosample cluster(ind)
outreg2 using "D:\Data\Workdata\703989\FJSJ3989\CIK\replication_restat\output\table_figureA12.txt", bdec(4) sdec(4) nocons nonotes 
}
